Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[SE-0296] Allow overloads that differ only in async #1392

Merged
merged 4 commits into from
Jun 30, 2021

Conversation

groue
Copy link
Contributor

@groue groue commented Jun 18, 2021

Hello, this pull request is an amendment to SE-0296 so that the compiler accepts function overloads that differ only in async.

It addresses this request from @DougGregor.

@groue groue force-pushed the groue/SE-0296-amendment branch from 04a7b08 to b83cd6c Compare June 23, 2021 17:37

In non-`async` functions, and closures without any `await` expression, the compiler selects the non-`async` overload:

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, I see the example 🙃
Would you mind adding in swift after the triple backticks to enable code highlighting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yes

@DougGregor DougGregor merged commit b69109d into swiftlang:main Jun 30, 2021
mattt pushed a commit to mattt/swift-evolution that referenced this pull request Aug 17, 2021
* [SE-0296] Allow overloads that differ only in async

* Fix typo, and enhance wording

* [SE-0296] Detail resolution of overloads that differ only in async

* [SE-0296] Fix typo
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants